<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 支持响应式开发 -->
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">

<title>Layui</title>
</head>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/layui/css/layui.css"
	media="all">
<script src="${pageContext.request.contextPath}/layui/layui.js"></script>


<body>



	<div class="layui-form-item" style="font-size: 18px; ">

		目录名: <input id="category_name" type="text" name="title" required
			lay-verify="required" placeholder="请输入目录名" autocomplete="off"
			class="layui-input"> 目录介绍: <input id="category_name"
			type="text" name="title" required lay-verify="required"
			placeholder="请输入目录介绍" autocomplete="off" class="layui-input">
		<a href="#" class="layui-btn layui-btn-warm">搜索</a>
	</div>
	<center>
		<h4 style="font-size: 25px; width: 500px">目录</h4>
	</center>
	<table class="layui-hide" id="test"></table>
	<script>
		layui.use('table', function() {
			var table = layui.table;

			table.render({
				elem : '#test',
				url : '${pageContext.request.contextPath}/doCategorySearchByPage.action',
				height:450,
				cellMinWidth : 80, //全局定义常规单元格的最小宽度，layui 2.2.1 新增
				page : true,
				cols : [ [ {
					field : 'categoryID',
					title : 'ID',
					sort : true
				}, {
					field : 'category_name',
					title : 'category_name'
				}, {
					field : 'category_desc',
					title : 'category_desc'
				} ] ]
			});
		});
	</script>
</body>
</html>